<?php

class Create_Products_Table {
  /**
   * Make changes to the database.
   *
   * @return void
   */
  public function up() {
    Schema::create('products', function($table) {
      $table->increments('id');
      $table->string('title');
      $table->decimal('price', 8, 2);
      $table->string('url');
      $table->integer('coupon_rate');
      $table->decimal('coupon_price', 8, 2);
      $table->date('start_time');
      $table->date('end_time');
      $table->string('mall');
      $table->text('description');
      $table->timestamps();
    });
  }

  /**
   * Revert the changes to the database.
   *
   * @return void
   */
  public function down() {
    Schema::drop('products');
  }

}
